package com.tarena.pojo;

import java.io.Serializable;

public class Message implements Serializable {//Serializable是Java提供的序列化接口，是一个空接口，为对象提供标准的序列化与反序列化操作
    private static final long serialVersionUID = 13988522380L;

    private User sender;
    private User getter;
    private String content;
    private String sentTime;
    private String magType;

    public Message() {
    }

    public Message(User sender, User getter, String content, String sentTime, String magType) {
        this.sender = sender;/*发送者*/
        this.getter = getter;/*接受者*/
        this.content = content;
        this.sentTime = sentTime;
        this.magType = magType;/*消息类型*/
    }

    public User getSender() {
        return sender;
    }

    public void setSender(User sender) {
        this.sender = sender;
    }

    public User getGetter() {
        return getter;
    }

    public void setGetter(User getter) {
        this.getter = getter;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSentTime() {
        return sentTime;
    }

    public void setSentTime(String sentTime) {
        this.sentTime = sentTime;
    }

    public String getMagType() {
        return magType;
    }

    public void setMagType(String magType) {
        this.magType = magType;
    }

    @Override
    public String toString() {
        return "Message{" +
                "sender=" + sender +
                ", getter=" + getter +
                ", content='" + content + '\'' +
                ", sentTime='" + sentTime + '\'' +
                ", magType='" + magType + '\'' +
                '}';
    }
}
